package com.androidx.p013lv.invention.view;

import android.content.Context;
import android.view.View;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.androidx.p013lv.base.Constance;
import com.androidx.p013lv.base.bean.BoardListBean;
import com.androidx.p013lv.base.bean.InventionBean;
import com.androidx.p013lv.base.listener.ItemClickListener;
import com.androidx.p013lv.invention.C1069R;
import com.androidx.p013lv.invention.OnInventionType;
import com.androidx.p013lv.invention.adapter.AdapterFive;

/* renamed from: com.androidx.lv.invention.view.FiveView */
public class FiveView {
    AdapterFive adapter;
    String domain;
    Fragment fragment;
    InventionBean inventionBean;
    Context mContext;
    OnInventionType onInventionType;
    int position;
    RecyclerView recycler;
    TextView tv_title;

    public FiveView(View view, Fragment fragment2, String str, OnInventionType onInventionType2) {
        this.mContext = view.getContext();
        this.onInventionType = onInventionType2;
        this.domain = str;
        this.fragment = fragment2;
        this.tv_title = (TextView) view.findViewById(C1069R.C1072id.tv_title);
        this.recycler = (RecyclerView) view.findViewById(C1069R.C1072id.recycler);
    }

    public void setView(InventionBean inventionBean2, int i) {
        this.inventionBean = inventionBean2;
        this.position = i;
        this.tv_title.setText(inventionBean2.getStationName());
        this.adapter = new AdapterFive(this.inventionBean.getBoardList(), this.fragment, this.domain);
        this.recycler.setLayoutManager(new LinearLayoutManager(this.mContext, 0, false));
        this.recycler.setAdapter(this.adapter);
        this.adapter.setItemListener(new ItemClickListener() {
            /* class com.androidx.p013lv.invention.view.FiveView.C11631 */

            @Override // com.androidx.p013lv.base.listener.ItemClickListener
            public void onItemClick(View view, int i) {
                if (view.getId() == C1069R.C1072id.btn_more || view.getId() == C1069R.C1072id.tv_title) {
                    ARouter.getInstance().build(Constance.TOP_ACTIVITY).withInt("type", ((BoardListBean) FiveView.this.adapter.getDataInPosition(i)).getType()).navigation();
                }
            }
        });
    }
}
